load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library", "rn_prebuilt_jar")

rn_android_library(
    name = "powermock",
    visibility = ["//ReactAndroid/..."],
    exported_deps = [
        ":javassist",
        ":mockito-all",
        ":powermock-api-mockito",
        ":powermock-api-support",
        ":powermock-classloading-base",
        ":powermock-classloading-xstream",
        ":powermock-core",
        ":powermock-module-junit4-rule",
        ":powermock-reflect",
        ":xmlpull",
        ":xpp3",
        ":xstream",
    ],
)

rn_prebuilt_jar(
    name = "powermock-core",
    binary_jar = ":download-powermock-core.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-core.jar",
    sha1 = "ea04e79244e19dcf0c3ccf6863c5b028b4b58c9c",
    url = "mvn:org.powermock:powermock-core:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "powermock-api-mockito",
    binary_jar = ":download-powermock-api-mockito.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-api-mockito.jar",
    sha1 = "c213230ae20a7b422f3d622a261d0e3427d2464c",
    url = "mvn:org.powermock:powermock-api-mockito:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "powermock-api-support",
    binary_jar = ":download-powermock-api-support.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-api-support.jar",
    sha1 = "93b21413b4ee99b7bc0dd34e1416fdca96866aaf",
    url = "mvn:org.powermock:powermock-api-support:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "powermock-module-junit4-rule",
    binary_jar = ":download-powermock-module-junit4-rule.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-module-junit4-rule.jar",
    sha1 = "4847638c5729b9f203e21144b0bdb5d34d888473",
    url = "mvn:org.powermock:powermock-module-junit4-rule:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "powermock-classloading-xstream",
    binary_jar = ":download-powermock-classloading-xstream.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-classloading-xstream.jar",
    sha1 = "3ced31cd7024fe365b9f3c8082d22c02434577da",
    url = "mvn:org.powermock:powermock-classloading-xstream:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "powermock-classloading-base",
    binary_jar = ":download-powermock-classloading-base.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-classloading-base.jar",
    sha1 = "c8bfc10731a02d3b241892cf2c334a754d473ca7",
    url = "mvn:org.powermock:powermock-classloading-base:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "xstream",
    binary_jar = ":download-xstream.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-xstream.jar",
    sha1 = "97e5013f391487cce4de6b0eebcde21549e91872",
    url = "mvn:com.thoughtworks.xstream:xstream:jar:1.4.2",
)

rn_prebuilt_jar(
    name = "powermock-reflect",
    binary_jar = ":download-powermock-reflect.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-powermock-reflect.jar",
    sha1 = "1af1bbd1207c3ecdcf64973e6f9d57dcd17cc145",
    url = "mvn:org.powermock:powermock-reflect:jar:1.6.2",
)

rn_prebuilt_jar(
    name = "javassist",
    binary_jar = ":download-javassist.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-javassist.jar",
    sha1 = "a9cbcdfb7e9f86fbc74d3afae65f2248bfbf82a0",
    url = "mvn:org.javassist:javassist:jar:3.20.0-GA",
)

rn_prebuilt_jar(
    name = "mockito-all",
    binary_jar = ":download-mockito-all.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-mockito-all.jar",
    sha1 = "539df70269cc254a58cccc5d8e43286b4a73bf30",
    url = "mvn:org.mockito:mockito-all:jar:1.10.19",
)

rn_prebuilt_jar(
    name = "xmlpull",
    binary_jar = ":download-xmlpull.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-xmlpull.jar",
    sha1 = "2b8e230d2ab644e4ecaa94db7cdedbc40c805dfa",
    url = "mvn:xmlpull:xmlpull:jar:1.1.3.1",
)

rn_prebuilt_jar(
    name = "xpp3",
    binary_jar = ":download-xpp3.jar",
    visibility = ["//ReactAndroid/..."],
)

fb_native.remote_file(
    name = "download-xpp3.jar",
    sha1 = "19d4e90b43059058f6e056f794f0ea4030d60b86",
    url = "mvn:xpp3:xpp3_min:jar:1.1.4c",
)
